package cn.com.bluemoon.daps.standard.vo;

import cn.com.bluemoon.daps.standard.entity.DapSystemCategory;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Jarod.Kong
 */
@NoArgsConstructor
@Data
public class SystemCategoryTreeVo implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;

    @ApiModelProperty(value = "分类代码")
    private String code;

    @ApiModelProperty(value = "分类名称")
    private String codeName;

    @ApiModelProperty(value = "针对主题或者分类来定义全称")
    private String fullName;

    @ApiModelProperty(value = "分类中父类id")
    private String parentId;

    @ApiModelProperty(value = "说明分类")
    private String remark;

    @ApiModelProperty(value = "对应主题或者分类 1：主题 0：分类")
    private Integer topic;

    private List<DapSystemCategory> nextNodes = new ArrayList<>();

    public SystemCategoryTreeVo(DapSystemCategory sysCategory) {
        BeanUtils.copyProperties(sysCategory, this);
    }
}
